import request from '@/utils/request';

export const preparationTask = {
  contextPath: '/patorl', //按照实际应用修改成微服务的名�?//
  // contextPath: '/equip', //按照实际应用修改成微服务的名�?//
  getdata: (data) => { //分页查询
    return request({
      url: preparationTask.contextPath + '/en-patrol-task/page',
      method: 'POST',
      data: data
    })
  },
  insertData: (data) => { //新增
    return request({
      url: preparationTask.contextPath + '/en-patrol-task/insert',
      method: 'POST',
      data: data
    })
  },

  updateData: (data) => { //修改，删除
    return request({
      url: preparationTask.contextPath + '/en-patrol-task/update',
      method: 'POST',
      data: data
    })
  },
  deleteData: (data) => { //删除
    return request({
      url: preparationTask.contextPath + '/en-patrol-task/delete',
      method: 'POST',
      data: data
    })
  },

  queryDictDatasb: (code) => { //获取巡视对象类型
    return request({
      // url: preparationTask.contextPath + '/t-en-wz-sblx/getList?pid=' + code,
      url: preparationTask.contextPath + '/en-wz-sblx/getList',
      method: 'POST',
      data: code
    })
  },

  getpatorlPage: (data) => { //获取物资
    return request({
      // url: preparationTask.contextPath + '/en-patrol-task-equip/page',
      url: preparationTask.contextPath + '/en-wz-jf-equip/page',
      method: 'POST',
      data: data
    })
  },
  getTaskEquipList: (taskNo) => { //根据任务编码获取设备列表
    return request({
      url: preparationTask.contextPath + '/en-patrol-task/getTaskEquipList/' + taskNo,
      method: 'POST',

    })
  },
  getJfByGldw: (code) => { //管理单位联动库房//
    return request({
      url: preparationTask.contextPath + '/en-wz-jfgl/ywdw/' + code,
      method: 'POST'
    })
  },
  gettaskNo: (code) => { //订单编号//
    return request({
      url: preparationTask.contextPath + '/en-patrol-task/genTaskNo',
      method: 'GET'
    })
  },


}
